Install JDK and Eclipse

For Windows

  1. Download Java JDK from http://www.oracle.com/technetwork/java/javase/downloads/index.html and install. Note that JDK contains JRE. Modify the following environment variables:

    • add JAVAHOME D:\Program Files (x86)\Java\jdk1.7.051
    • add Path %JAVA_HOME%\bin;\%JAVA_HOME%\jre\bin;
    • add CLASSPATH %JAVA_HOME%\lib\tools.jar;%JAVA_HOME%\jre\lib\rt.jar
  2. Download Eclipse from http://www.eclipse.org/downloads/ and click eclipse.exe

For Linux

  1. Install JDK

    1
    2
    3
    4
    sudo add-apt-repository ppa:webupd8team/java
    sudo apt-get update // depending on the needed java version
    sudo apt-get install openjdk-7-jdk
    or sudo apt-get install openjdk-8-jre openjdk-8-jdk
  2. Download Eclipse and unpack

  3. Create a new file eclipse.desktop in /usr/share/applications/ and add the below code

    1
    2
    3
    4
    5
    6
    7
    8
       [Desktop Entry]
    Name=Eclipse
    Comment=Eclipse IDE
    Exec=/home/liniu/Program_Files/Eclipse/eclipse/eclipse
    Icon=/home/ivan/Eclipse/icon.xpm
    Categories=Application;Development;Java;IDE
    Type=Application
    Terminal=0

    and then run

    1
    sudo desktop-file-install /usr/share/applications/eclipse.desktop
  4. Add to the path: sudo ln -s /opt/eclipse/eclipse /usr/local/bin/